/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sn.gandal.agriculture.agrimobile.j2me.gui;

import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.AlertType;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;

/**
 *
 * @author dysow
 */
public class ConfirmationForm extends Alert implements CommandListener
{

    Command back;

    private ConfirmationForm(String message)
    {
	super("Page de Confirmation", message, null, AlertType.CONFIRMATION);
	back = new Command("Retour", Command.BACK, 1);
	addCommands(back);
	this.setTimeout(FOREVER);
    }

    public static Alert ConfirmAction(String message)
    {
	return new ConfirmationForm(message);
    }

    public void addCommands(Command cmd)
    {
	super.addCommand(cmd);
    }

    public void commandAction(Command c, Displayable d)
    {
	this.setTimeout(0);

    }
}
